import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('@/views/HomePage.vue'),
  },
  {
    path: '/preview',
    name: 'Preview',
    component: () => import('@/views/preview/index.vue'),
  },
  {
    path: '/preview-textplain',
    name: 'PreviewTextPlain',
    component: () => import('@/views/preview/TextPlain.vue'),
  },
  {
    path: '/edit',
    name: 'Edit',
    component: () => import('@/views/edit/index.vue'),
  },
  {
    path: '/edit-markdown',
    name: 'EditMarkdown',
    component: () => import('@/views/edit/Markdown.vue'),
  },
  {
    path: '/document-convert',
    name: 'DocumentConvert',
    component: () => import('@/views/convert/document/index.vue'),
  },
  {
    path: '/pdf-to-word',
    name: 'PdfToWord',
    component: () => import('@/views/convert/document/PdfToWord.vue'),
  },
  {
    path: '/audio-convert',
    name: 'AudioConvert',
    component: () => import('@/views/convert/audio/index.vue'),
  },
  {
    path: '/image-convert',
    name: 'ImageConvert',
    component: () => import('@/views/convert/image/index.vue'),
  },
  {
    path: '/jpg-to-png',
    name: 'JpgToPng',
    component: () => import('@/views/convert/image/JpgToPng.vue'),
  },
  {
    path: '/png-to-ico',
    name: 'PngToIco',
    component: () => import('@/views/convert/image/PngToIco.vue'),
  },
  {
    path: '/video-convert',
    name: 'VideoConvert',
    component: () => import('@/views/convert/video/index.vue'),
  },
]
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: () => import('@/layouts/BaseLayout.vue'),
      children: [...routes],
    },
  ],
})
export default router
